package com.qwert.shortlink.project.controller;

import com.qwert.shortlink.project.common.convention.result.Result;
import com.qwert.shortlink.project.dto.req.recyclebin.RecycleBinSaveReqDTO;
import com.qwert.shortlink.project.service.IRecycleBinService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 短链接回收站控制层
 * @author qwert
 * @version 1.0.0
 * @create 2024/7/6 20:34
 **/
@RestController
@RequestMapping("/api/shortlink")
@RequiredArgsConstructor
public class RecycleBinController {

    private final IRecycleBinService recycleBinService;

    @PostMapping("/v1/recycle-bin/save")
    public Result<Integer> saveRecycleBin(@RequestBody RecycleBinSaveReqDTO recycleBinSaveReqDTO){
        return Result.success(recycleBinService.saveRecycleBin(recycleBinSaveReqDTO));
    }

}
